<%@ page pageEncoding="UTF-8"%>
<%!
	// 第3方调用时校验身份信息
	public Message validateInfo(Map<String, String> parameters, String key) {
		String thisTime = Tools.getDesc(parameters.get("thistime"), "");
		String signature =  Tools.getDesc(parameters.get("signature"), "");
		String md5Key = Tools.getMD5(thisTime + key, "UTF-8");
		if ("".equals(thisTime) || "".equals(signature) || !signature.equals(md5Key)) 
			return new Message(10001, "验证信息不合法");
		return new Message();
	}
%>
<%
	// 验证第3方信息
	msg = validateInfo(parameters, app_secret);
	 if (msg.getErrcode() != 0) {
		 Tools.encryptPrint(out, msg);
		 return;
	 }
%>